package com.example.mall.dto.user;

import com.example.mall.dto.validator.TokenPassword;
import com.example.mall.dto.validator.UserSignUpAccountEqual;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;

@Getter
@Setter
@UserSignUpAccountEqual(message = "{signup.notsimpl.account}")
public class UserSignUpDTO {
    @NotBlank(message = "{signup.account}")
    private String account;

    @NotBlank(message = "{signup.account}")
    private String account2;

    @NotBlank(message = "{signup.password}")
    @TokenPassword(min = 6, max = 11,message = "{signup.password.len}")
    private String password;

    private String nickname;

    @Override
    public String toString() {
        return "UserSignUpDTO{" +
                "account='" + account + '\'' +
                ", account2='" + account2 + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                '}';
    }
}
